<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"   
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:composite="http://java.sun.com/jsf/composite"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:faces="http://java.sun.com/jsf/composite/faces/components">
 
    <composite:interface >
    	<composite:attribute name="id" type="java.lang.String"/>
	   	<composite:attribute name="label" type="java.lang.String"/>
	   	<composite:attribute name="styleClass" type="java.lang.String"/>
	   	<composite:attribute name="style" type="java.lang.String"/>
    	<composite:attribute name="disabled" type="java.lang.Boolean" default="false"/>
    	<composite:attribute name="readonly" type="java.lang.Boolean" default="false"/>
    	<composite:attribute name="value"/>
    	<composite:editableValueHolder name="input" targets="input"/>
    	
    	<composite:attribute name="trueLabel" type="java.lang.String" default="是"/>
    	<composite:attribute name="falseLabel" type="java.lang.String" default="否"/>
    	<composite:attribute name="noSelectionLabel" type="java.lang.String"/>
    </composite:interface>
 
    <composite:implementation >
    	<h:selectOneMenu styleClass="#{styleClass}" label="#{cc.attrs.label}" 
   			id="input" disabled="#{cc.attrs.disabled}"  value="#{cc.attrs.value}"
   			readonly="#{cc.attrs.readonly}" style="#{cc.attrs.style}">
   			<c:if test="#{not empty cc.attrs.noSelectionLabel}">
      			<f:selectItem itemValue="#{null}" itemLabel="#{cc.attrs.noSelectionLabel}"/>
   			</c:if>
   			<f:selectItem itemLabel="#{cc.attrs.trueLabel}" itemValue="true"/>
   			<f:selectItem itemLabel="#{cc.attrs.falseLabel}" itemValue="false"/>
        </h:selectOneMenu>
    </composite:implementation>
</ui:composition>